import request from '../network/request'

const Api = {
    twEnterpriseMyDetail: 'api/biz/twEnterprise/myDetail',
    twEnterpriseMyEdit: 'api/biz/twEnterprise/edit',
    twEnterpriseRecommend: 'api/biz/twEnterprise/recommend',
    twEnterpriseGetById: 'api/biz/twEnterprise/getById',
    twEnterpriseFollow: 'api/biz/twEnterprise/follow',
    twEnterprisePageApi: 'api/biz/twEnterprise/pageApi',
 }

export const twEnterpriseRecommend=() =>{
    return request({
        url: Api.twEnterpriseRecommend,
        method: 'get',
        headers: {contentType: 'application/x-www-form-urlencoded',loading:false}
    })
}


export const twEnterpriseMyDetail=() =>{
    return request({
        url: Api.twEnterpriseMyDetail,
        method: 'get',
        headers: {contentType: 'application/x-www-form-urlencoded',loading:false}
    })
}



export const twEnterpriseMyEdit=(data) =>{
    return request({
        url: Api.twEnterpriseMyEdit,
        method: 'post',
        data:data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}



export const twEnterpriseFollow=(data) =>{
    return request({
        url: Api.twEnterpriseFollow,
        method: 'post',
        data:data,
        headers: {contentType: 'application/x-www-form-urlencoded',loading:true}
    })
}





export const twEnterpriseGetById=(id) =>{
    return request({
        url: Api.twEnterpriseGetById,
        method: 'get',
        data: {id},
        headers: {contentType: 'application/x-www-form-urlencoded'}
    })
}





export const twEnterprisePageApi=(data) =>{
    return request({
        url: Api.twEnterprisePageApi,
        method: 'get',
        data: data,
        headers: {contentType: 'application/x-www-form-urlencoded',loading:false}
    })
}



